<div ng-controller="WifiCtrl" ng-init="shopAction()">
    <ul class="sui-breadcrumb">
        <li><a href="#/wifi/index">{{'无线wifi'| translate}}</a></li>
        <li>
            {{'门店'|translate}}
        </li>
        <li>
            {{shopinfo.shop_name}}
        </li>
        <span class="sui-form sui-form pull-right"> 
            <button class="sui-btn btn-small btn-danger" ng-click="shopWifiClean()">清空门店wifi</button>
            <input type="text" ng-model="ssid" placeholder="无线名称" >
            <input type="text" ng-model="passwd" placeholder="无线密码" >
            <button ng-click="wifiAdd()"  class="sui-btn btn-small btn-primary">+ 添加wifi</button>
        </span>
    </ul>
    <div>
        <table class="sui-table table-bordered" style="width: 62%;">
            <thead>
                <tr>
                    <th>{{'主页设置'|translate}}</th>
                    <th>{{'顶部栏文字'|translate}}</th>
                    <th>{{'设备总数'|translate}}</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="list in devices">
                    <td>
                        <gzh-linked-app ng-model="shopinfo.finishpage_wxa_user_name" gzh-app-id="{{gzh_appid}}" shop-id="{{shop_id}}" store-id="{{store_id}}"></gzh-linked-app>
                    </td>
                    <td>
                        <wifi-bar-text ng-model="bar_type" dft="1"></wifi-bar-text>
                        <button class="sui-btn btn-primary" ng-click="barTypeSave()">保存</button>
                    </td>
                    <td>
                        设备总数：{{shopinfo.ap_count}}
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <p style="clear: both;"></p>
    <table ng-show="devices.length" class="sui-table table-bordered" style="margin-top: 30px;width: 32%;">
        <thead>
            <tr>
                <th></th>
                <th>{{'wifi名称'|translate}}</th>
                <th>{{'类型'|translate}}</th>
                <th>{{'操作'|translate}}</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="list in devices">
                <td>
                </td>
                <td>
                    {{list.ssid}}
                </td>
                <td>
                    <span ng-show="!list.protocol_type">未添加</span>
                    <span ng-show="list.protocol_type==4">密码型</span>
                    <span ng-show="list.protocol_type==31">协议型</span>
                </td>
                <td>
                    <button class="sui-btn btn-small btn-primary" ng-click="wifiQrcode(list.ssid)">二维码</button>
                    <button class="sui-btn btn-small btn-danger" ng-click="wifiDel(list.bssid)">删除</button>
                </td>
            </tr>
        </tbody>
    </table>
    <pager page-no="1" page-size="pageSize" total="detail_count" get-data="getDetailList(pageNo)"></pager>
</div>